﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;
using Fayshine.VA.RIAService.Web;

namespace Fayshine.VA.Models
{
    /// <summary>
    /// Extension class for area entity
    /// </summary>
    public class AreaExtend : INotifyPropertyChanged
    {
        private bool m_IsSelect = false;
        private object m_Tag;
        private int m_ID;
        private string m_Name;
        private int m_ParentID;

        public bool IsSelected
        {
            get
            {
                return m_IsSelect;
            }
            set
            {
                if (m_IsSelect != value)
                {
                    m_IsSelect = value;
                    NofityPropertyChanged("IsSelected");
                }
            }

        }

        public object Tag
        {
            get
            {
                return m_Tag;
            }
            set
            {
                m_Tag = value;
                NofityPropertyChanged("Tag");
            }
        }

        public string Name
        {
            get
            {
                return m_Name;
            }
            set
            {
                m_Name = value;
                NofityPropertyChanged("Name");
            }
        }

        public int ID
        {
            get
            {
                return m_ID;
            }
            set
            {
                m_ID = value;
                NofityPropertyChanged("ID");
            }
        }

        public int ParentID
        {
            get
            {
                return m_ParentID;
            }
            set
            {
                m_ParentID = value;
                NofityPropertyChanged("ParentID");
            }
        }

        #region INotifyPropertyChanged Interface

        public event PropertyChangedEventHandler PropertyChanged;
        public void NofityPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        #endregion
    }
}
